<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button id="but1">点击加载</button>
<br><span id="msg"></span>
       <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
       <script>
           $("#but1").click(function() {
               $.ajax({
                   url: "http://127.0.0.1:5000/show_detail",
                   data: {
                       "id": "123"
                   },
                   type: "GET",
                   async: true,
                   timeout: 300000, //超时时间
                   dataType: 'text', //返回的数据格式， json/html/xml/script/jsonp/text
                   beforeSend: function (xhr) {
                       console.log("发送请求前")
                   },
                   success: function(data, textStatus, xhr){
                       console.log("请求成功");
                       console.log(data);
                       $("#msg").html(data)

                   },
                   error: function (xhr, textStatus) {
                       console.log("请求失败");
                       console.log(textStatus);
                       console.log(xhr)
                   },
                   complete: function () {
                       console.log("请求结束")
                   }
               })
           })
       </script>
</body>
</html>